package com.df.blueben.controller;

import com.df.blueben.common.BaseResponse;
import com.df.blueben.common.ResultUtils;
import com.df.blueben.model.entity.Tags;
import com.df.blueben.service.TagsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/tag")
public class TagController {

    @Autowired
    TagsService tagsService;

    @GetMapping("/search")
    public BaseResponse<List<Tags>> searchTags() {
        List<Tags> tagsList = tagsService.searchTags();
        return ResultUtils.success(tagsList);
    }
}
